"use strict";

import Ajax from "../libs/ajax";
import Constant from "../libs/constants";

const AccountSetting = {
    addOrUpdateAccount(url, data) {
        return Ajax.ajax({
            url: url,
            data: data,
            method: "post"
        }).then(res => res.data);
    },
    getAllAccount() {
        return Ajax.ajax({
            url: Constant.URL_GETALL_ACCOUNT,
            method: "get"
        }).then(res => res.data);
    },
    deleteAccount(data) {
        return Ajax.ajax({
            url: Constant.URL_DELETE_ACCOUNT,
            data: data,
            method: "post"
        }).then(res => res.data);
    }
}

export default AccountSetting